package zheezes.swt.databinding;

import org.eclipse.core.databinding.beans.BeansObservables;
import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.Realm;

public class BeansListObservableFactory extends BeansObservableFactory {
	private final String propertyName;

	public BeansListObservableFactory(Class<?> clazz, String propertyName) {
		super(clazz);
		this.propertyName = propertyName;
	}

	@Override
	protected IObservable createBeanObservable(Object target) {
		return BeansObservables.observeList(Realm.getDefault(), target,	propertyName);
	}
}